home *** CD-ROM | disk | FTP | other *** search
/ CD/PC Actual 3 / CD ACTUAL 3.iso / linux / docs / linux-do / programm / lpg-0.4 / lpg-0 / LPG / graphic.tex / node30_ct.html < prev    next >
LaTeX Document  |  1995-03-28  |  4.5 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
90% dexvert Hypertext Markup Language File (text/html) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file HTML document text default (weak)
99% file LaTeX document text default
98% file C source text default
97% file exported SGML document text default
96% file exported SGML document, ASCII text default
80% TrID HyperText Markup Language with DOCTYPE default
19% TrID HyperText Markup Language default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% gt2 HTML (Hyper Text Markup Language) Datei default
100% detectItEasy Format: Plain text[LF] default
100% xdgMime text/html default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3c 21 44 4f 43 54 59 50 | 45 20 48 54 4d 4c 20 50 |<!DOCTYP|E HTML P|
|00000010| 55 42 4c 49 43 20 22 2d | 2f 2f 57 33 43 2f 2f 44 |UBLIC "-|//W3C//D|
|00000020| 54 44 20 48 54 4d 4c 20 | 33 2e 32 20 46 69 6e 61 |TD HTML |3.2 Fina|
|00000030| 6c 2f 2f 65 6e 22 3e 0a | 0a 3c 21 2d 2d 43 6f 6e |l//en">.|.<!--Con|
|00000040| 76 65 72 74 65 64 20 77 | 69 74 68 20 4c 61 54 65 |verted w|ith LaTe|
|00000050| 58 32 48 54 4d 4c 20 32 | 30 32 32 20 28 52 65 6c |X2HTML 2|022 (Rel|
|00000060| 65 61 73 65 64 20 4a 61 | 6e 75 61 72 79 20 31 2c |eased Ja|nuary 1,|
|00000070| 20 32 30 32 32 29 20 2d | 2d 3e 0a 3c 48 54 4d 4c | 2022) -|->.<HTML|
|00000080| 20 6c 61 6e 67 3d 22 65 | 6e 22 3e 0a 3c 48 45 41 | lang="e|n">.<HEA|
|00000090| 44 3e 0a 3c 54 49 54 4c | 45 3e 43 6f 6e 74 65 6e |D>.<TITL|E>Conten|
|000000a0| 74 73 20 6f 66 20 55 70 | 64 61 74 69 6e 67 20 74 |ts of Up|dating t|
|000000b0| 68 65 20 54 65 72 6d 69 | 6e 61 6c 3c 2f 54 49 54 |he Termi|nal</TIT|
|000000c0| 4c 45 3e 0a 0a 3c 4d 45 | 54 41 20 48 54 54 50 2d |LE>..<ME|TA HTTP-|
|000000d0| 45 51 55 49 56 3d 22 43 | 6f 6e 74 65 6e 74 2d 54 |EQUIV="C|ontent-T|
|000000e0| 79 70 65 22 20 43 4f 4e | 54 45 4e 54 3d 22 74 65 |ype" CON|TENT="te|
|000000f0| 78 74 2f 68 74 6d 6c 3b | 20 63 68 61 72 73 65 74 |xt/html;| charset|
|00000100| 3d 75 74 66 2d 38 22 3e | 0a 3c 4d 45 54 41 20 4e |=utf-8">|.<META N|
|00000110| 41 4d 45 3d 22 76 69 65 | 77 70 6f 72 74 22 20 43 |AME="vie|wport" C|
|00000120| 4f 4e 54 45 4e 54 3d 22 | 77 69 64 74 68 3d 64 65 |ONTENT="|width=de|
|00000130| 76 69 63 65 2d 77 69 64 | 74 68 2c 20 69 6e 69 74 |vice-wid|th, init|
|00000140| 69 61 6c 2d 73 63 61 6c | 65 3d 31 2e 30 22 3e 0a |ial-scal|e=1.0">.|
|00000150| 3c 4d 45 54 41 20 4e 41 | 4d 45 3d 22 47 65 6e 65 |<META NA|ME="Gene|
|00000160| 72 61 74 6f 72 22 20 43 | 4f 4e 54 45 4e 54 3d 22 |rator" C|ONTENT="|
|00000170| 4c 61 54 65 58 32 48 54 | 4d 4c 20 76 32 30 32 32 |LaTeX2HT|ML v2022|
|00000180| 22 3e 0a 0a 3c 4c 49 4e | 4b 20 52 45 4c 3d 22 53 |">..<LIN|K REL="S|
|00000190| 54 59 4c 45 53 48 45 45 | 54 22 20 48 52 45 46 3d |TYLESHEE|T" HREF=|
|000001a0| 22 67 72 61 70 68 69 63 | 2e 63 73 73 22 3e 0a 0a |"graphic|.css">..|
|000001b0| 3c 4c 49 4e 4b 20 52 45 | 4c 3d 22 6e 65 78 74 22 |<LINK RE|L="next"|
|000001c0| 20 48 52 45 46 3d 22 6e | 6f 64 65 33 31 5f 6d 6e | HREF="n|ode31_mn|
|000001d0| 2e 68 74 6d 6c 22 3e 0a | 3c 4c 49 4e 4b 20 52 45 |.html">.|<LINK RE|
|000001e0| 4c 3d 22 70 72 65 76 69 | 6f 75 73 22 20 48 52 45 |L="previ|ous" HRE|
|000001f0| 46 3d 22 6e 6f 64 65 32 | 39 5f 6d 6e 2e 68 74 6d |F="node2|9_mn.htm|
|00000200| 6c 22 3e 0a 3c 4c 49 4e | 4b 20 52 45 4c 3d 22 75 |l">.<LIN|K REL="u|
|00000210| 70 22 20 48 52 45 46 3d | 22 6e 6f 64 65 31 5f 6d |p" HREF=|"node1_m|
|00000220| 6e 2e 68 74 6d 6c 22 3e | 0a 3c 4c 49 4e 4b 20 52 |n.html">|.<LINK R|
|00000230| 45 4c 3d 22 6e 65 78 74 | 22 20 48 52 45 46 3d 22 |EL="next|" HREF="|
|00000240| 6e 6f 64 65 33 31 5f 6d | 6e 2e 68 74 6d 6c 22 3e |node31_m|n.html">|
|00000250| 0a 3c 2f 48 45 41 44 3e | 0a 20 0a 3c 42 4f 44 59 |.</HEAD>|. .<BODY|
|00000260| 20 62 67 63 6f 6c 6f 72 | 3d 22 23 66 66 66 66 66 | bgcolor|="#fffff|
|00000270| 66 22 20 74 65 78 74 3d | 22 23 30 30 30 30 30 30 |f" text=|"#000000|
|00000280| 22 20 6c 69 6e 6b 3d 22 | 23 39 39 34 34 45 45 22 |" link="|#9944EE"|
|00000290| 20 76 6c 69 6e 6b 3d 22 | 23 30 30 30 30 66 66 22 | vlink="|#0000ff"|
|000002a0| 20 61 6c 69 6e 6b 3d 22 | 23 30 30 66 66 30 30 22 | alink="|#00ff00"|
|000002b0| 3e 0a 0a 3c 48 31 3e 3c | 41 20 49 44 3d 22 53 45 |>..<H1><|A ID="SE|
|000002c0| 43 54 49 4f 4e 30 30 31 | 31 30 30 30 30 30 30 30 |CTION001|10000000|
|000002d0| 30 30 30 30 30 30 30 30 | 30 30 22 3e 0a 55 70 64 |00000000|00">.Upd|
|000002e0| 61 74 69 6e 67 20 74 68 | 65 20 54 65 72 6d 69 6e |ating th|e Termin|
|000002f0| 61 6c 3c 2f 41 3e 0a 3c | 2f 48 31 3e 0a 0a 3c 50 |al</A>.<|/H1>..<P|
|00000300| 3e 0a 41 73 20 77 72 69 | 74 74 65 6e 20 69 6e 20 |>.As wri|tten in |
|00000310| 74 68 65 20 6f 76 65 72 | 76 69 65 77 2c 20 6e 63 |the over|view, nc|
|00000320| 75 72 73 65 73 20 77 69 | 6e 64 6f 77 73 20 61 72 |urses wi|ndows ar|
|00000330| 65 20 69 6d 61 67 65 73 | 20 69 6e 20 6d 65 6d 6f |e images| in memo|
|00000340| 72 79 2e 20 54 68 69 73 | 0a 6d 65 61 6e 73 20 74 |ry. This|.means t|
|00000350| 68 61 74 20 61 6e 79 20 | 63 68 61 6e 67 65 20 74 |hat any |change t|
|00000360| 6f 20 61 20 77 69 6e 64 | 6f 77 20 69 73 20 6e 6f |o a wind|ow is no|
|00000370| 74 20 70 72 69 6e 74 65 | 64 20 74 6f 20 74 68 65 |t printe|d to the|
|00000380| 20 70 68 79 73 69 63 61 | 6c 20 73 63 72 65 65 6e | physica|l screen|
|00000390| 20 75 6e 74 69 6c 0a 61 | 20 72 65 66 72 65 73 68 | until.a| refresh|
|000003a0| 20 69 73 20 64 6f 6e 65 | 2e 20 20 54 68 69 73 20 | is done|. This |
|000003b0| 6f 70 74 69 6d 69 7a 65 | 73 20 74 68 65 20 6f 75 |optimize|s the ou|
|000003c0| 74 70 75 74 20 74 6f 20 | 74 68 65 20 73 63 72 65 |tput to |the scre|
|000003d0| 65 6e 20 62 65 63 61 75 | 73 65 20 79 6f 75 0a 63 |en becau|se you.c|
|000003e0| 61 6e 20 64 6f 20 61 20 | 6c 6f 74 20 6f 66 20 6d |an do a |lot of m|
|000003f0| 61 6e 69 70 75 6c 61 74 | 69 6f 6e 73 20 61 6e 64 |anipulat|ions and|
|00000400| 20 74 68 65 6e 2c 20 6f | 6e 63 65 2c 20 63 61 6c | then, o|nce, cal|
|00000410| 6c 20 72 65 66 72 65 73 | 68 20 74 6f 20 70 72 69 |l refres|h to pri|
|00000420| 6e 74 20 69 74 0a 74 6f | 20 73 63 72 65 65 6e 2e |nt it.to| screen.|
|00000430| 20 20 4f 74 68 65 72 77 | 69 73 65 2c 20 65 76 65 | Otherw|ise, eve|
|00000440| 72 79 20 63 68 61 6e 67 | 65 20 77 6f 75 6c 64 20 |ry chang|e would |
|00000450| 62 65 20 70 72 69 6e 74 | 65 64 20 74 6f 20 74 68 |be print|ed to th|
|00000460| 65 20 74 65 72 6d 69 6e | 61 6c 20 61 6e 64 0a 64 |e termin|al and.d|
|00000470| 65 63 72 65 61 73 65 20 | 74 68 65 20 70 65 72 66 |ecrease |the perf|
|00000480| 6f 72 6d 61 6e 63 65 20 | 6f 66 20 79 6f 75 72 20 |ormance |of your |
|00000490| 70 72 6f 67 72 61 6d 73 | 2e 0a 0a 3c 50 3e 0a 0a |programs|...<P>..|
|000004a0| 3c 55 4c 3e 0a 3c 4c 49 | 3e 3c 54 54 3e 69 6e 74 |<UL>.<LI|><TT>int|
|000004b0| 20 72 65 66 72 65 73 68 | 28 29 3c 2f 54 54 3e 20 | refresh|()</TT> |
|000004c0| 3c 41 20 49 44 3d 22 66 | 75 6e 5f 72 65 66 72 65 |<A ID="f|un_refre|
|000004d0| 73 68 22 3e 3c 2f 41 3e | 0a 3c 42 52 3e 20 20 20 |sh"></A>|.<BR> |
|000004e0| 20 20 20 20 20 3c 54 54 | 3e 69 6e 74 20 77 72 65 | <TT|>int wre|
|000004f0| 66 72 65 73 68 28 77 69 | 6e 29 3c 2f 54 54 3e 20 |fresh(wi|n)</TT> |
|00000500| 3c 41 20 49 44 3d 22 66 | 75 6e 5f 77 72 65 66 72 |<A ID="f|un_wrefr|
|00000510| 65 73 68 22 3e 3c 2f 41 | 3e 0a 3c 42 52 3e 20 20 |esh"></A|>.<BR> |
|00000520| 20 20 20 20 20 20 3c 42 | 3e 72 65 66 72 65 73 68 | <B|>refresh|
|00000530| 28 29 3c 2f 42 3e 20 63 | 6f 70 69 65 73 20 3c 49 |()</B> c|opies <I|
|00000540| 3e 73 74 64 73 63 72 3c | 2f 49 3e 20 74 6f 20 74 |>stdscr<|/I> to t|
|00000550| 68 65 20 74 65 72 6d 69 | 6e 61 6c 20 61 6e 64 0a |he termi|nal and.|
|00000560| 20 20 20 20 20 20 20 20 | 3c 42 3e 77 72 65 66 72 | |<B>wrefr|
|00000570| 65 73 68 28 77 69 6e 29 | 3c 2f 42 3e 20 63 6f 70 |esh(win)|</B> cop|
|00000580| 69 65 73 20 74 68 65 20 | 77 69 6e 64 6f 77 20 69 |ies the |window i|
|00000590| 6d 61 67 65 20 74 6f 20 | 3c 49 3e 73 74 64 73 63 |mage to |<I>stdsc|
|000005a0| 72 3c 2f 49 3e 20 61 6e | 64 20 0a 20 20 20 20 20 |r</I> an|d . |
|000005b0| 20 20 20 74 68 65 6e 20 | 6d 61 6b 65 73 0a 20 20 | then |makes. |
|000005c0| 20 20 20 20 20 20 3c 49 | 3e 63 75 72 73 63 72 3c | <I|>curscr<|
|000005d0| 2f 49 3e 20 6c 6f 6f 6b | 73 20 6c 69 6b 65 20 3c |/I> look|s like <|
|000005e0| 49 3e 73 74 64 73 63 72 | 3c 2f 49 3e 2e 0a 0a 3c |I>stdscr|</I>...<|
|000005f0| 50 3e 0a 3c 2f 4c 49 3e | 0a 3c 4c 49 3e 3c 54 54 |P>.</LI>|.<LI><TT|
|00000600| 3e 69 6e 74 20 77 6e 6f | 75 74 72 65 66 72 65 73 |>int wno|utrefres|
|00000610| 68 28 77 69 6e 29 3c 2f | 54 54 3e 20 3c 41 20 49 |h(win)</|TT> <A I|
|00000620| 44 3d 22 66 75 6e 5f 77 | 6e 6f 75 74 72 65 66 72 |D="fun_w|noutrefr|
|00000630| 65 73 68 22 3e 3c 2f 41 | 3e 0a 3c 42 52 3e 20 20 |esh"></A|>.<BR> |
|00000640| 20 20 20 20 20 20 3c 54 | 54 3e 69 6e 74 20 64 6f | <T|T>int do|
|00000650| 75 70 64 61 74 65 28 29 | 3c 2f 54 54 3e 20 3c 41 |update()|</TT> <A|
|00000660| 20 49 44 3d 22 66 75 6e | 5f 64 6f 75 70 64 61 74 | ID="fun|_doupdat|
|00000670| 65 22 3e 3c 2f 41 3e 0a | 3c 42 52 3e 20 20 20 20 |e"></A>.|<BR> |
|00000680| 20 20 20 20 3c 42 3e 77 | 6e 6f 75 74 72 65 66 72 | <B>w|noutrefr|
|00000690| 65 73 68 28 77 69 6e 29 | 3c 2f 42 3e 20 63 6f 70 |esh(win)|</B> cop|
|000006a0| 69 65 73 20 74 68 65 20 | 77 69 6e 64 6f 77 20 3c |ies the |window <|
|000006b0| 54 54 3e 77 69 6e 3c 2f | 54 54 3e 20 74 6f 20 3c |TT>win</|TT> to <|
|000006c0| 49 3e 73 74 64 73 63 72 | 3c 2f 49 3e 20 6f 6e 6c |I>stdscr|</I> onl|
|000006d0| 79 2e 0a 20 20 20 20 20 | 20 20 20 54 68 69 73 20 |y.. | This |
|000006e0| 6d 65 61 6e 73 20 74 68 | 61 74 20 6e 6f 20 6f 75 |means th|at no ou|
|000006f0| 74 70 75 74 20 74 6f 20 | 74 68 65 20 74 65 72 6d |tput to |the term|
|00000700| 69 6e 61 6c 20 69 73 20 | 64 6f 6e 65 20 62 75 74 |inal is |done but|
|00000710| 20 74 68 65 20 76 69 72 | 74 75 61 6c 0a 20 20 20 | the vir|tual. |
|00000720| 20 20 20 20 20 73 63 72 | 65 65 6e 20 3c 49 3e 73 | scr|een <I>s|
|00000730| 74 64 73 63 72 3c 2f 49 | 3e 20 61 63 74 75 61 6c |tdscr</I|> actual|
|00000740| 6c 79 20 6c 6f 6f 6b 73 | 20 6c 69 6b 65 20 74 68 |ly looks| like th|
|00000750| 65 20 70 72 6f 67 72 61 | 6d 6d 65 72 20 77 61 6e |e progra|mmer wan|
|00000760| 74 65 64 2e 0a 20 20 20 | 20 20 20 20 20 3c 42 3e |ted.. | <B>|
|00000770| 64 6f 75 70 64 61 74 65 | 28 29 3c 2f 42 3e 20 77 |doupdate|()</B> w|
|00000780| 69 6c 6c 20 64 6f 20 74 | 68 65 20 6f 75 74 70 75 |ill do t|he outpu|
|00000790| 74 20 74 6f 20 74 68 65 | 20 74 65 72 6d 69 6e 61 |t to the| termina|
|000007a0| 6c 2e 20 41 20 70 72 6f | 67 72 61 6d 20 63 61 6e |l. A pro|gram can|
|000007b0| 0a 20 20 20 20 20 20 20 | 20 63 68 61 6e 67 65 20 |. | change |
|000007c0| 76 61 72 69 6f 75 73 20 | 77 69 6e 64 6f 77 73 2c |various |windows,|
|000007d0| 20 63 61 6c 6c 20 3c 42 | 3e 77 6e 6f 75 74 72 65 | call <B|>wnoutre|
|000007e0| 66 72 65 73 68 28 77 69 | 6e 29 3c 2f 42 3e 20 66 |fresh(wi|n)</B> f|
|000007f0| 6f 72 20 65 76 65 72 79 | 20 77 69 6e 64 6f 77 0a |or every| window.|
|00000800| 20 20 20 20 20 20 20 20 | 61 6e 64 20 74 68 65 6e | |and then|
|00000810| 20 63 61 6c 6c 20 3c 42 | 3e 64 6f 75 70 64 61 74 | call <B|>doupdat|
|00000820| 65 28 29 3c 2f 42 3e 20 | 74 6f 20 75 70 64 61 74 |e()</B> |to updat|
|00000830| 65 20 74 68 65 20 70 68 | 79 73 69 63 61 6c 20 73 |e the ph|ysical s|
|00000840| 63 72 65 65 6e 20 6f 6e | 6c 79 20 6f 6e 63 65 2e |creen on|ly once.|
|00000850| 0a 0a 3c 50 3e 0a 46 6f | 72 20 69 6e 73 74 61 6e |..<P>.Fo|r instan|
|00000860| 63 65 2c 20 77 65 20 68 | 61 76 65 20 74 68 65 20 |ce, we h|ave the |
|00000870| 66 6f 6c 6c 6f 77 69 6e | 67 20 70 72 6f 67 72 61 |followin|g progra|
|00000880| 6d 20 77 69 74 68 20 74 | 77 6f 20 77 69 6e 64 6f |m with t|wo windo|
|00000890| 77 73 2e 0a 20 20 20 20 | 20 20 20 20 57 65 20 63 |ws.. | We c|
|000008a0| 68 61 6e 67 65 20 62 6f | 74 68 20 77 69 6e 64 6f |hange bo|th windo|
|000008b0| 77 73 20 62 79 20 61 6c | 74 65 72 69 6e 67 20 73 |ws by al|tering s|
|000008c0| 6f 6d 65 20 6c 69 6e 65 | 73 20 6f 66 20 74 65 78 |ome line|s of tex|
|000008d0| 74 2e 0a 20 20 20 20 20 | 20 20 20 57 65 20 63 61 |t.. | We ca|
|000008e0| 6e 20 77 72 69 74 65 20 | 3c 49 3e 63 68 61 6e 67 |n write |<I>chang|
|000008f0| 65 77 69 6e 28 77 69 6e | 29 3c 2f 49 3e 20 77 69 |ewin(win|)</I> wi|
|00000900| 74 68 20 3c 42 3e 77 72 | 65 66 72 65 73 68 28 77 |th <B>wr|efresh(w|
|00000910| 69 6e 29 3c 2f 42 3e 2e | 0a 0a 3c 50 3e 0a 3c 42 |in)</B>.|..<P>.<B|
|00000920| 52 3e 0a 3c 49 4d 47 0a | 20 20 53 54 59 4c 45 3d |R>.<IMG.| STYLE=|
|00000930| 22 22 20 53 52 43 3d 22 | 69 6d 67 32 36 2e 70 6e |"" SRC="|img26.pn|
|00000940| 67 22 0a 20 41 4c 54 3d | 22 5c 62 65 67 69 6e 7b |g". ALT=|"\begin{|
|00000950| 74 73 63 72 65 65 6e 7d | 0a 5c 62 65 67 69 6e 7b |tscreen}|.\begin{|
|00000960| 76 65 72 62 61 74 69 6d | 7d 6d 61 69 6e 28 29 20 |verbatim|}main() |
|00000970| 63 68 61 6e 67 65 77 69 | 6e 28 57 49 4e 44 4f 57 |changewi|n(WINDOW|
|00000980| 20 2a 77 69 6e 29 0a 7b | 20 7b 0a 57 49 4e 44 4f | *win).{| {.WINDO|
|00000990| 57 20 2a 77 2e 2e 2e 0a | 2e 2e 2e 3b 20 77 72 65 |W *w....|...; wre|
|000009a0| 66 72 65 73 68 28 77 69 | 6e 29 3b 0a 63 68 61 6e |fresh(wi|n);.chan|
|000009b0| 67 65 77 69 6e 28 77 69 | 6e 32 29 3b 20 72 65 74 |gewin(wi|n2); ret|
|000009c0| 75 72 6e 3b 0a 2e 2e 2e | 20 7d 0a 7d 5c 65 6e 64 |urn;....| }.}\end|
|000009d0| 7b 76 65 72 62 61 74 69 | 6d 7d 0a 5c 65 6e 64 7b |{verbati|m}.\end{|
|000009e0| 74 73 63 72 65 65 6e 7d | 22 3e 0a 3c 42 52 3e 0a |tscreen}|">.<BR>.|
|000009f0| 0a 3c 50 3e 0a 54 68 69 | 73 20 77 69 6c 6c 20 63 |.<P>.Thi|s will c|
|00000a00| 61 75 73 65 20 6e 63 75 | 72 73 65 73 20 74 6f 20 |ause ncu|rses to |
|00000a10| 75 70 64 61 74 65 20 74 | 68 65 20 74 65 72 6d 69 |update t|he termi|
|00000a20| 6e 61 6c 20 74 77 69 63 | 65 20 61 6e 64 20 73 6c |nal twic|e and sl|
|00000a30| 6f 77 20 64 6f 77 6e 20 | 6f 75 72 0a 20 20 20 20 |ow down |our. |
|00000a40| 20 20 20 20 65 78 65 63 | 75 74 69 6f 6e 2e 20 57 | exec|ution. W|
|00000a50| 69 74 68 20 3c 42 3e 64 | 6f 75 70 64 61 74 65 28 |ith <B>d|oupdate(|
|00000a60| 29 3c 2f 42 3e 20 77 65 | 20 63 68 61 6e 67 65 20 |)</B> we| change |
|00000a70| 3c 49 3e 63 68 61 6e 67 | 65 77 69 6e 28 77 69 6e |<I>chang|ewin(win|
|00000a80| 29 3c 2f 49 3e 20 61 6e | 64 0a 20 20 20 20 20 20 |)</I> an|d. |
|00000a90| 20 20 6f 75 72 20 6d 61 | 69 6e 20 66 75 6e 63 74 | our ma|in funct|
|00000aa0| 69 6f 6e 20 61 6e 64 20 | 77 69 6c 6c 20 67 65 74 |ion and |will get|
|00000ab0| 20 62 65 74 74 65 72 20 | 61 20 70 65 72 66 6f 72 | better |a perfor|
|00000ac0| 6d 61 6e 63 65 2e 0a 0a | 3c 50 3e 0a 3c 42 52 3e |mance...|<P>.<BR>|
|00000ad0| 0a 3c 49 4d 47 0a 20 20 | 53 54 59 4c 45 3d 22 22 |.<IMG. |STYLE=""|
|00000ae0| 20 53 52 43 3d 22 69 6d | 67 32 37 2e 70 6e 67 22 | SRC="im|g27.png"|
|00000af0| 0a 20 41 4c 54 3d 22 5c | 62 65 67 69 6e 7b 74 73 |. ALT="\|begin{ts|
|00000b00| 63 72 65 65 6e 7d 0a 5c | 62 65 67 69 6e 7b 76 65 |creen}.\|begin{ve|
|00000b10| 72 62 61 74 69 6d 7d 6d | 61 69 6e 28 29 20 63 68 |rbatim}m|ain() ch|
|00000b20| 61 6e 67 65 77 69 6e 28 | 57 49 4e 44 4f 57 20 2a |angewin(|WINDOW *|
|00000b30| 77 69 6e 29 0a 7b 20 7b | 0a 57 49 4e 44 4f 57 20 |win).{ {|.WINDOW |
|00000b40| 2a 77 2e 2e 2e 0a 2e 2e | 2e 6e 29 3b 0a 63 68 61 |*w......|.n);.cha|
|00000b50| 6e 67 65 77 69 6e 28 77 | 69 6e 32 29 3b 20 72 65 |ngewin(w|in2); re|
|00000b60| 74 75 72 6e 3b 0a 64 6f | 75 70 64 61 74 65 28 29 |turn;.do|update()|
|00000b70| 3b 20 7d 0a 2e 2e 2e 0a | 7d 5c 65 6e 64 7b 76 65 |; }.....|}\end{ve|
|00000b80| 72 62 61 74 69 6d 7d 0a | 5c 65 6e 64 7b 74 73 63 |rbatim}.|\end{tsc|
|00000b90| 72 65 65 6e 7d 22 3e 0a | 3c 42 52 3e 0a 0a 3c 50 |reen}">.|<BR>..<P|
|00000ba0| 3e 0a 3c 2f 4c 49 3e 0a | 3c 4c 49 3e 3c 54 54 3e |>.</LI>.|<LI><TT>|
|00000bb0| 69 6e 74 20 72 65 64 72 | 61 77 77 69 6e 28 77 69 |int redr|awwin(wi|
|00000bc0| 6e 29 3c 2f 54 54 3e 20 | 3c 41 20 49 44 3d 22 66 |n)</TT> |<A ID="f|
|00000bd0| 75 6e 5f 72 65 64 72 61 | 77 77 69 6e 22 3e 3c 2f |un_redra|wwin"></|
|00000be0| 41 3e 0a 3c 42 52 3e 20 | 20 20 20 20 20 20 20 3c |A>.<BR> | <|
|00000bf0| 54 54 3e 69 6e 74 20 77 | 72 65 64 72 61 77 6c 6e |TT>int w|redrawln|
|00000c00| 28 77 69 6e 2c 20 62 6c | 69 6e 65 2c 20 6e 6c 69 |(win, bl|ine, nli|
|00000c10| 6e 65 73 29 3c 2f 54 54 | 3e 20 3c 41 20 49 44 3d |nes)</TT|> <A ID=|
|00000c20| 22 66 75 6e 5f 77 72 65 | 64 72 61 77 6c 6e 22 3e |"fun_wre|drawln">|
|00000c30| 3c 2f 41 3e 0a 3c 42 52 | 3e 0a 55 73 65 20 74 68 |</A>.<BR|>.Use th|
|00000c40| 65 73 65 20 66 75 6e 63 | 74 69 6f 6e 73 20 77 68 |ese func|tions wh|
|00000c50| 65 6e 20 73 6f 6d 65 20 | 6c 69 6e 65 73 20 6f 72 |en some |lines or|
|00000c60| 20 74 68 65 20 65 6e 74 | 69 72 65 20 73 63 72 65 | the ent|ire scre|
|00000c70| 65 6e 20 73 68 6f 75 6c | 64 0a 20 20 20 20 20 20 |en shoul|d. |
|00000c80| 20 20 74 68 72 6f 77 6e | 20 61 77 61 79 20 62 65 | thrown| away be|
|00000c90| 66 6f 72 65 20 77 72 69 | 74 69 6e 67 20 61 6e 79 |fore wri|ting any|
|00000ca0| 74 68 69 6e 67 20 6e 65 | 77 20 69 6e 20 69 74 20 |thing ne|w in it |
|00000cb0| 28 6d 61 79 20 62 65 20 | 77 68 65 6e 20 74 68 65 |(may be |when the|
|00000cc0| 0a 20 20 20 20 20 20 20 | 20 6c 69 6e 65 73 20 61 |. | lines a|
|00000cd0| 72 65 20 74 72 61 73 68 | 65 64 20 6f 72 20 73 6f |re trash|ed or so|
|00000ce0| 29 2e 0a 0a 3c 50 3e 0a | 3c 2f 4c 49 3e 0a 3c 4c |)...<P>.|</LI>.<L|
|00000cf0| 49 3e 3c 54 54 3e 69 6e | 74 20 74 6f 75 63 68 77 |I><TT>in|t touchw|
|00000d00| 69 6e 28 77 69 6e 29 3c | 2f 54 54 3e 20 3c 41 20 |in(win)<|/TT> <A |
|00000d10| 49 44 3d 22 66 75 6e 5f | 74 6f 75 63 68 77 69 6e |ID="fun_|touchwin|
|00000d20| 22 3e 3c 2f 41 3e 0a 3c | 42 52 3e 20 20 20 20 20 |"></A>.<|BR> |
|00000d30| 20 20 20 3c 54 54 3e 69 | 6e 74 20 74 6f 75 63 68 | <TT>i|nt touch|
|00000d40| 6c 69 6e 65 28 77 69 6e | 2c 20 73 74 61 72 74 2c |line(win|, start,|
|00000d50| 20 63 6f 75 6e 74 29 3c | 2f 54 54 3e 20 3c 41 20 | count)<|/TT> <A |
|00000d60| 49 44 3d 22 66 75 6e 5f | 74 6f 75 63 68 6c 69 6e |ID="fun_|touchlin|
|00000d70| 65 22 3e 3c 2f 41 3e 0a | 3c 42 52 3e 20 20 20 20 |e"></A>.|<BR> |
|00000d80| 20 20 20 20 3c 54 54 3e | 69 6e 74 20 77 74 6f 75 | <TT>|int wtou|
|00000d90| 63 68 6c 6e 28 77 69 6e | 2c 20 79 2c 20 6e 2c 20 |chln(win|, y, n, |
|00000da0| 63 68 61 6e 67 65 64 29 | 3c 2f 54 54 3e 20 3c 41 |changed)|</TT> <A|
|00000db0| 20 49 44 3d 22 66 75 6e | 5f 77 74 6f 75 63 68 6c | ID="fun|_wtouchl|
|00000dc0| 6e 22 3e 3c 2f 41 3e 0a | 3c 42 52 3e 20 20 20 20 |n"></A>.|<BR> |
|00000dd0| 20 20 20 20 3c 54 54 3e | 69 6e 74 20 75 6e 74 6f | <TT>|int unto|
|00000de0| 75 63 68 77 69 6e 28 77 | 69 6e 29 3c 2f 54 54 3e |uchwin(w|in)</TT>|
|00000df0| 20 3c 41 20 49 44 3d 22 | 66 75 6e 5f 75 6e 74 6f | <A ID="|fun_unto|
|00000e00| 75 63 68 77 69 6e 22 3e | 3c 2f 41 3e 0a 3c 42 52 |uchwin">|</A>.<BR|
|00000e10| 3e 0a 54 65 6c 6c 73 20 | 6e 63 75 72 73 65 73 20 |>.Tells |ncurses |
|00000e20| 74 68 61 74 20 74 68 65 | 20 77 68 6f 6c 65 20 77 |that the| whole w|
|00000e30| 69 6e 64 6f 77 20 3c 54 | 54 3e 77 69 6e 3c 2f 54 |indow <T|T>win</T|
|00000e40| 54 3e 20 6f 72 20 74 68 | 65 20 6c 69 6e 65 73 20 |T> or th|e lines |
|00000e50| 66 72 6f 6d 0a 20 20 20 | 20 20 20 20 20 3c 54 54 |from. | <TT|
|00000e60| 3e 73 74 61 72 74 3c 2f | 54 54 3e 20 75 70 20 74 |>start</|TT> up t|
|00000e70| 6f 20 3c 54 54 3e 73 74 | 61 72 74 2b 63 6f 75 6e |o <TT>st|art+coun|
|00000e80| 74 3c 2f 54 54 3e 0a 20 | 20 20 20 20 20 20 20 68 |t</TT>. | h|
|00000e90| 61 76 65 20 62 65 65 6e | 20 6d 61 6e 69 70 75 6c |ave been| manipul|
|00000ea0| 61 74 65 64 2e 20 46 6f | 72 20 69 6e 73 74 61 6e |ated. Fo|r instan|
|00000eb0| 63 65 2c 20 77 68 65 6e | 20 79 6f 75 20 68 61 76 |ce, when| you hav|
|00000ec0| 65 20 73 6f 6d 65 20 6f | 76 65 72 6c 61 70 70 69 |e some o|verlappi|
|00000ed0| 6e 67 0a 20 20 20 20 20 | 20 20 20 77 69 6e 64 6f |ng. | windo|
|00000ee0| 77 73 20 28 61 73 20 69 | 6e 20 74 68 65 20 65 78 |ws (as i|n the ex|
|00000ef0| 61 6d 70 6c 65 20 3c 49 | 3e 74 79 70 65 2e 63 3c |ample <I|>type.c<|
|00000f00| 2f 49 3e 29 20 61 20 63 | 68 61 6e 67 65 20 74 6f |/I>) a c|hange to|
|00000f10| 20 6f 6e 65 0a 20 20 20 | 20 20 20 20 20 77 69 6e | one. | win|
|00000f20| 64 6f 77 20 77 69 6c 6c | 20 6e 6f 74 20 61 66 66 |dow will| not aff|
|00000f30| 65 63 74 20 74 68 65 20 | 69 6d 61 67 65 20 66 72 |ect the |image fr|
|00000f40| 6f 6d 20 74 68 65 20 6f | 74 68 65 72 2e 0a 0a 3c |om the o|ther...<|
|00000f50| 50 3e 0a 3c 42 3e 77 74 | 6f 75 63 68 6c 6e 28 2e |P>.<B>wt|ouchln(.|
|00000f60| 2e 2e 29 3c 2f 42 3e 20 | 77 69 6c 6c 20 74 6f 75 |..)</B> |will tou|
|00000f70| 63 68 20 3c 54 54 3e 6e | 3c 2f 54 54 3e 20 6c 69 |ch <TT>n|</TT> li|
|00000f80| 6e 65 73 20 73 74 61 72 | 74 69 6e 67 20 61 74 20 |nes star|ting at |
|00000f90| 3c 54 54 3e 79 3c 2f 54 | 54 3e 2e 0a 20 20 20 20 |<TT>y</T|T>.. |
|00000fa0| 20 20 20 20 49 66 20 3c | 54 54 3e 63 68 61 6e 67 | If <|TT>chang|
|00000fb0| 65 3c 2f 54 54 3e 20 69 | 73 20 54 52 55 45 20 74 |e</TT> i|s TRUE t|
|00000fc0| 68 65 20 6c 69 6e 65 73 | 20 61 72 65 20 74 6f 75 |he lines| are tou|
|00000fd0| 63 68 65 64 2c 20 6f 74 | 68 65 72 77 69 73 65 20 |ched, ot|herwise |
|00000fe0| 75 6e 74 6f 75 63 68 65 | 64 0a 20 20 20 20 20 20 |untouche|d. |
|00000ff0| 20 20 28 63 68 61 6e 67 | 65 64 20 6f 72 20 75 6e | (chang|ed or un|
|00001000| 63 68 61 6e 67 65 64 29 | 2e 0a 0a 3c 50 3e 0a 3c |changed)|...<P>.<|
|00001010| 42 3e 75 6e 74 6f 75 63 | 68 77 69 6e 28 77 69 6e |B>untouc|hwin(win|
|00001020| 29 3c 2f 42 3e 20 77 69 | 6c 6c 20 6d 61 72 6b 20 |)</B> wi|ll mark |
|00001030| 74 68 65 20 77 69 6e 64 | 6f 77 20 3c 54 54 3e 77 |the wind|ow <TT>w|
|00001040| 69 6e 3c 2f 54 54 3e 20 | 61 73 20 75 6e 63 68 61 |in</TT> |as uncha|
|00001050| 6e 67 65 64 0a 20 20 20 | 20 20 20 20 20 73 69 6e |nged. | sin|
|00001060| 63 65 20 74 68 65 20 6c | 61 73 74 20 63 61 6c 6c |ce the l|ast call|
|00001070| 20 74 6f 20 3c 42 3e 72 | 65 66 72 65 73 68 28 29 | to <B>r|efresh()|
|00001080| 3c 2f 42 3e 2e 0a 0a 3c | 50 3e 0a 3c 2f 4c 49 3e |</B>...<|P>.</LI>|
|00001090| 0a 3c 4c 49 3e 3c 54 54 | 3e 69 6e 74 20 69 73 5f |.<LI><TT|>int is_|
|000010a0| 6c 69 6e 65 74 6f 75 63 | 68 65 64 28 77 69 6e 2c |linetouc|hed(win,|
|000010b0| 20 6c 69 6e 65 29 3c 2f | 54 54 3e 20 3c 41 20 49 | line)</|TT> <A I|
|000010c0| 44 3d 22 66 75 6e 5f 69 | 73 5f 6c 69 6e 65 74 6f |D="fun_i|s_lineto|
|000010d0| 75 63 68 65 64 22 3e 3c | 2f 41 3e 0a 3c 42 52 3e |uched"><|/A>.<BR>|
|000010e0| 20 20 20 20 20 20 20 20 | 3c 54 54 3e 69 6e 74 20 | |<TT>int |
|000010f0| 69 73 5f 77 69 6e 74 6f | 75 63 68 65 64 28 77 69 |is_winto|uched(wi|
|00001100| 6e 29 3c 2f 54 54 3e 20 | 3c 41 20 49 44 3d 22 66 |n)</TT> |<A ID="f|
|00001110| 75 6e 5f 69 73 5f 77 69 | 6e 74 6f 75 63 68 65 64 |un_is_wi|ntouched|
|00001120| 22 3e 3c 2f 41 3e 0a 3c | 42 52 3e 0a 57 69 74 68 |"></A>.<|BR>.With|
|00001130| 20 74 68 65 73 65 20 66 | 75 6e 63 74 69 6f 6e 73 | these f|unctions|
|00001140| 20 79 6f 75 20 63 61 6e | 20 63 68 65 63 6b 20 69 | you can| check i|
|00001150| 66 20 74 68 65 20 6c 69 | 6e 65 20 3c 54 54 3e 6c |f the li|ne <TT>l|
|00001160| 69 6e 65 3c 2f 54 54 3e | 20 6f 72 20 74 68 65 0a |ine</TT>| or the.|
|00001170| 20 20 20 20 20 20 20 20 | 77 69 6e 64 6f 77 20 3c | |window <|
|00001180| 54 54 3e 77 69 6e 3c 2f | 54 54 3e 20 68 61 73 20 |TT>win</|TT> has |
|00001190| 62 65 65 6e 20 74 6f 75 | 63 68 65 64 20 73 69 6e |been tou|ched sin|
|000011a0| 63 65 20 74 68 65 20 6c | 61 73 74 20 63 61 6c 6c |ce the l|ast call|
|000011b0| 20 74 6f 0a 20 20 20 20 | 20 20 20 20 3c 42 3e 72 | to. | <B>r|
|000011c0| 65 66 72 65 73 68 28 29 | 3c 2f 42 3e 2e 0a 3c 2f |efresh()|</B>..</|
|000011d0| 4c 49 3e 0a 3c 2f 55 4c | 3e 0a 0a 3c 50 3e 0a 0a |LI>.</UL|>..<P>..|
|000011e0| 3c 48 52 3e 0a 0a 3c 2f | 42 4f 44 59 3e 0a 3c 2f |<HR>..</|BODY>.</|
|000011f0| 48 54 4d 4c 3e 0a | |HTML>. | |
+--------+-------------------------+-------------------------+--------+--------+